<div class="navbar navbar-default navbar-fixed-top" role="navigation">
	<div class="container">
		<div class="navbar-header">
			<a class="navbar-brand" href="#">LOG</a>
		</div>
		<div class="navbar-collapse collapse">
			<%= render_list :class => "nav navbar-nav" do |li|
			     li << link_to(t("menu.index"), root_path)
			     li << link_to(t("menu.movie"), movies_path )
			     li << link_to(t("menu.series"), series_movies_path )
			     li << link_to(t("menu.special"), specials_path)
			     li << link_to(t("menu.top"), top_movies_path)
			end %>
			<ul class="nav navbar-nav navbar-left">
				<li class="search_box" style="margin-left:20px;">
					<form class="navbar-form navbar-left" role="search" action="<%=search_movies_path%>">
						<div class="form-group">
							<div class="input-group">
								<input class="form-control" id="search_key" name="q" placeholder="<%=t('notice.sreach') %>" value="<%=params[:q]%>">
								<div class="input-group-addon">
									<button type="submit" class="btn btn-success">
										<i class="fa fa-search"></i>
									</button>
								</div>
							</div>
						</div>
					</form>
				</li>
			</ul>
			<%
			if current_user.nil?
			%>

			<%= render_list :class => "nav navbar-nav navbar-right" do |li|
			     li << link_to(t("menu.register"), new_users_path)
			     li << link_to(t("menu.login"), login_users_path)
			end %>

			<% else %>
			<%= render_list :class => "nav navbar-nav navbar-right" do |li|
			     li << link_to(current_user.name, new_users_path)
			     li << link_to("menu.login", login_users_path)
			     li << link_to("后台管理", login_users_path) if admin
			end %>
			<% end %>
		</div>
	</div>
</div>
